<template>
|
<div style="padding:0px 14px;height: 100%;overflow: auto;">
|
<div class="need-feed-header">
|
<div style="height:28px;line-height:28px;">
|
<el-divider class="pane-divider" direction="vertical"></el-divider
|
><span style="font-size:14px;font-weight:bold">工单所需物料</span>
|
</div>
|
</div>
|
<el-table
|
ref="materialTable"
|
:data="materialList"
|
@row-click="changeMaterial"
|
highlight-current-row
|
height="230px"
|
:header-cell-style="needFeedsTableHeaderCellStyle"
|
:row-class-name="needFeedsTableRowClassName"
|
class="feed-table need-feed-content"
|
>
|
<el-table-column
|
label="零件编号"
|
prop="partNo"
|
align="center"
|
:show-overflow-tooltip="true"
|
>
|
<template slot="header">
|
<div style="line-height: 14px;">零件编号</div>
|
<div class="th" @click.stop>
|
<template>
|
<el-input
|
type="text"
|
v-model="queryParamOne.partNo"
|
@keyup.enter.native="handleMaterialList"
|
clearable
|
@clear="handleMaterialList"
|
size="mini"
|
></el-input>
|
</template>
|
</div>
|
</template>
|
<template slot-scope="scope">
|
<span>{{ scope.row.partNo }}</span>
|
</template>
|
</el-table-column>
|
<el-table-column
|
label="零件"
|
prop="partName"
|
align="center"
|
:show-overflow-tooltip="true"
|
>
|
<template slot="header">
|
<div style="line-height: 14px;">零件</div>
|
<div class="th" @click.stop>
|
<el-input
|
type="text"
|
v-model="queryParamOne.partName"
|
@keyup.enter.native="handleMaterialList"
|
clearable
|
@clear="handleMaterialList"
|
size="mini"
|
></el-input>
|
</div>
|
</template>
|
<template slot-scope="scope">
|
<span>{{ scope.row.partName }}</span>
|
</template>
|
</el-table-column>
|
<el-table-column
|
label="单位产出所需数量"
|
prop="qpa"
|
align="center"
|
:show-overflow-tooltip="true"
|
>
|
<template slot="header">
|
<div style="line-height: 14px;">单位产出所需数量</div>
|
<div class="th" @click.stop>
|
<el-input
|
type="text"
|
v-model="queryParamOne.qpa"
|
@keyup.enter.native="handleMaterialList"
|
clearable
|
@clear="handleMaterialList"
|
size="mini"
|
></el-input>
|
</div>
|
</template>
|
<template slot-scope="scope">
|
<span>{{ scope.row.qpa }}</span>
|
</template>
|
</el-table-column>
|
<el-table-column
|
label="订单需求数量"
|
prop="quantityRequired"
|
align="center"
|
:show-overflow-tooltip="true"
|
>
|
<template slot="header">
|
<div style="line-height: 14px;">订单需求数量</div>
|
<div class="th" @click.stop>
|
<el-input
|
type="text"
|
v-model="queryParamOne.quantityRequired"
|
@keyup.enter.native="handleMaterialList"
|
clearable
|
@clear="handleMaterialList"
|
size="mini"
|
></el-input>
|
</div>
|
</template>
|
<template slot-scope="scope">
|
<span>{{ scope.row.quantityRequired }}</span>
|
</template>
|
</el-table-column>
|
<el-table-column
|
label="单位"
|
prop="unit"
|
align="center"
|
:show-overflow-tooltip="true"
|
>
|
<template slot="header">
|
<div style="line-height: 14px;">单位</div>
|
<div class="th" @click.stop>
|
<template>
|
<el-input
|
type="text"
|
v-model="queryParamOne.unit"
|
@keyup.enter.native="handleMaterialList"
|
clearable
|
@clear="handleMaterialList"
|
size="mini"
|
></el-input>
|
</template>
|
</div>
|
</template>
|
<template slot-scope="scope">
|
<span>{{ scope.row.unit }}</span>
|
</template>
|
</el-table-column>
|
</el-table>
|
<el-tabs v-model="activeName">
|
<el-tab-pane name="first" label="线边仓合格物料">
|
<div class="line-side-warehouse-header">
|
<div>
|
<el-divider class="pane-divider" direction="vertical"></el-divider
|
><span style="font-size:14px;font-weight:bold">线边仓合格物料</span>
|
</div>
|
<div>
|
<el-button
|
v-if="permissions.product_feed_scan"
|
class="feeding-btn"
|
type="primary"
|
icon="feed-btn-feeding"
|
@click="scanAddFeed()"
|
>扫码投料</el-button
|
>
|
<el-button
|
class="feeding-btn"
|
type="primary"
|
icon="feed-btn-feeding"
|
@click="addFeed()"
|
>投料</el-button
|
>
|
</div>
|
</div>
|
<el-table
|
ref="stockTable"
|
:summary-method="getSummaries"
|
show-summary
|
:data="stockList"
|
@selection-change="selectionStockChange"
|
height="218px"
|
@row-click="clickStock"
|
:header-cell-style="lineSideWarehouseTableHeaderCellStyle"
|
:row-class-name="lineSideWarehouseTableRowClassName"
|
class="feed-table line-side-warehouse-content"
|
>
|
<el-table-column type="selection" width="45"></el-table-column>
|
<el-table-column label="序号" prop="No" align="center" width="50">
|
<template slot="header">
|
<div style="line-height: 14px;">序号</div>
|
</template>
|
<template slot-scope="scope">
|
<span>{{ scope.$index + 1 }}</span>
|
</template>
|
</el-table-column>
|
<el-table-column
|
label="零件编号"
|
prop="partNo"
|
align="center"
|
:show-overflow-tooltip="true"
|
>
|
<template slot="header">
|
<div style="line-height: 14px;">零件编号</div>
|
<div class="th" @click.stop>
|
<el-input
|
type="text"
|
v-model="queryParamTwo.partNo"
|
@keyup.enter.native="handleStockList"
|
clearable
|
@clear="handleStockList"
|
size="mini"
|
></el-input>
|
</div>
|
</template>
|
<template slot-scope="scope">
|
<span>{{ scope.row.partNo }}</span>
|
</template>
|
</el-table-column>
|
<el-table-column
|
label="零件"
|
prop="partName"
|
align="center"
|
:show-overflow-tooltip="true"
|
>
|
<template slot="header">
|
<div style="line-height: 14px;">零件</div>
|
<div class="th" @click.stop>
|
<el-input
|
type="text"
|
v-model="queryParamTwo.partName"
|
@keyup.enter.native="handleStockList"
|
clearable
|
@clear="handleStockList"
|
size="mini"
|
></el-input>
|
</div>
|
</template>
|
<template slot-scope="scope">
|
<span>{{ scope.row.partName }}</span>
|
</template>
|
</el-table-column>
|
<el-table-column
|
label="零件描述"
|
prop="partDescription"
|
align="center"
|
>
|
<template slot="header">
|
<div style="line-height: 14px;">零件描述</div>
|
<div class="th" @click.stop>
|
<el-input
|
type="text"
|
v-model="queryParamTwo.partDescription"
|
@keyup.enter.native="handleStockList"
|
clearable
|
@clear="handleStockList"
|
size="mini"
|
></el-input>
|
</div>
|
</template>
|
<template slot-scope="scope">
|
<span>{{ scope.row.partDescription }}</span>
|
</template>
|
</el-table-column>
|
<el-table-column label="IFS批次号" prop="ifsBatchNo" align="center">
|
<template slot="header">
|
<div style="line-height: 14px;">IFS批次号</div>
|
<div class="th" @click.stop>
|
<el-input
|
type="text"
|
v-model="queryParamTwo.ifsBatchNo"
|
@keyup.enter.native="handleStockList"
|
clearable
|
@clear="handleStockList"
|
size="mini"
|
></el-input>
|
</div>
|
</template>
|
<template slot-scope="scope">
|
<span>{{ scope.row.ifsBatchNo }}</span>
|
</template>
|
</el-table-column>
|
<el-table-column label="SN号" prop="partBatchNo" align="center">
|
<template slot="header">
|
<div style="line-height: 14px;">SN号</div>
|
<div class="th" @click.stop>
|
<el-input
|
type="text"
|
v-model="queryParamTwo.partBatchNo"
|
@keyup.enter.native="handleStockList"
|
clearable
|
@clear="handleStockList"
|
size="mini"
|
></el-input>
|
</div>
|
</template>
|
<template slot-scope="scope">
|
<span>{{ scope.row.partBatchNo }}</span>
|
</template>
|
</el-table-column>
|
<el-table-column
|
label="载具编号"
|
prop="reelNumber"
|
align="center"
|
:show-overflow-tooltip="true"
|
>
|
<template slot="header">
|
<div style="line-height: 14px;">载具编号</div>
|
<div class="th" @click.stop>
|
<el-input
|
type="text"
|
v-model="queryParamTwo.reelNumber"
|
@keyup.enter.native="handleStockList"
|
clearable
|
@clear="handleStockList"
|
size="mini"
|
></el-input>
|
</div>
|
</template>
|
<template slot-scope="scope">
|
<span>{{ scope.row.reelNumber }}</span>
|
</template>
|
</el-table-column>
|
<el-table-column
|
label="规格型号"
|
prop="specs"
|
align="center"
|
:show-overflow-tooltip="true"
|
>
|
<template slot="header">
|
<div style="line-height: 14px;">规格型号</div>
|
<div class="th" @click.stop>
|
<el-input
|
type="text"
|
v-model="queryParamTwo.specs"
|
@keyup.enter.native="handleStockList"
|
clearable
|
@clear="handleStockList"
|
size="mini"
|
></el-input>
|
</div>
|
</template>
|
<template slot-scope="scope">
|
<span>{{ scope.row.specs }}</span>
|
</template>
|
</el-table-column>
|
<el-table-column label="单位" prop="unit" align="center">
|
<template slot="header">
|
<div style="line-height: 14px;">单位</div>
|
<div class="th" @click.stop>
|
<el-input
|
type="text"
|
v-model="queryParamTwo.unit"
|
@keyup.enter.native="handleStockList"
|
clearable
|
@clear="handleStockList"
|
size="mini"
|
></el-input>
|
</div>
|
</template>
|
<template slot-scope="scope">
|
<span>{{ scope.row.unit }}</span>
|
</template>
|
</el-table-column>
|
<el-table-column
|
label="可用数量"
|
prop="availableStockQuantity"
|
align="center"
|
>
|
<template slot="header">
|
<div style="line-height: 14px;">可用数量</div>
|
<div class="th" @click.stop>
|
<el-input
|
type="text"
|
v-model="queryParamTwo.availableStockQuantity"
|
@keyup.enter.native="handleStockList"
|
clearable
|
@clear="handleStockList"
|
size="mini"
|
></el-input>
|
</div>
|
</template>
|
<template slot-scope="scope">
|
<span>{{ scope.row.availableStockQuantity }}</span>
|
</template>
|
</el-table-column>
|
<el-table-column label="库存数量" prop="stockQuantity" align="center">
|
<template slot="header">
|
<div style="line-height: 14px;">库存数量</div>
|
<div class="th" @click.stop>
|
<el-input
|
type="text"
|
v-model="queryParamTwo.stockQuantity"
|
@keyup.enter.native="handleStockList"
|
clearable
|
@clear="handleStockList"
|
size="mini"
|
></el-input>
|
</div>
|
</template>
|
<template slot-scope="scope">
|
<span>{{ scope.row.stockQuantity }}</span>
|
</template>
|
</el-table-column>
|
<el-table-column
|
label="预留数量"
|
prop="reserveQuantity"
|
align="center"
|
>
|
<template slot="header">
|
<div style="line-height: 14px;">预留数量</div>
|
<div class="th" @click.stop>
|
<el-input
|
type="text"
|
v-model="queryParamTwo.reserveQuantity"
|
@keyup.enter.native="handleStockList"
|
clearable
|
@clear="handleStockList"
|
size="mini"
|
></el-input>
|
</div>
|
</template>
|
<template slot-scope="scope">
|
<span>{{ scope.row.reserveQuantity }}</span>
|
</template>
|
</el-table-column>
|
<el-table-column label="库位号" prop="locationNo" align="center">
|
<template slot="header">
|
<div style="line-height: 14px;">库位号</div>
|
<div class="th" @click.stop>
|
<el-input
|
type="text"
|
v-model="queryParamTwo.locationNo"
|
@keyup.enter.native="handleStockList"
|
clearable
|
@clear="handleStockList"
|
size="mini"
|
></el-input>
|
</div>
|
</template>
|
<template slot-scope="scope">
|
<span>{{ scope.row.locationNo }}</span>
|
</template>
|
</el-table-column>
|
</el-table>
|
<div class="pagin-page" style="margin-top: 0;margin-bottom: 0;">
|
<el-pagination
|
:current-page="queryReport.current"
|
:page-sizes="[10, 15, 20, 50, 100]"
|
:page-size="queryReport.size"
|
layout="total, sizes, prev, pager, next, jumper"
|
@size-change="handleSizeChangeReport"
|
@current-change="handleCurrentChangeReport"
|
:total="queryReport.total"
|
>
|
</el-pagination>
|
</div>
|
</el-tab-pane>
|
|
<!-- -->
|
<el-tab-pane name="second" label="线边仓待处理物料">
|
<div class="line-side-warehouse-header">
|
<div>
|
<el-divider class="pane-divider" direction="vertical"></el-divider
|
><span style="font-size:14px;font-weight:bold"
|
>线边仓待处理物料</span
|
>
|
</div>
|
<div>
|
<el-button
|
v-if="permissions.product_feed_scan"
|
class="feeding-btn"
|
type="primary"
|
icon="feed-btn-feeding"
|
@click="scanAddFeed()"
|
>扫码投料</el-button
|
>
|
<el-button
|
class="feeding-btn"
|
type="primary"
|
icon="feed-btn-feeding"
|
@click="addFeed()"
|
>投料</el-button
|
>
|
</div>
|
</div>
|
|
<el-table
|
ref="stockTodoTable"
|
:summary-method="getSummaries"
|
show-summary
|
:data="stockTodoList"
|
@selection-change="selectionTodoStockChange"
|
height="218px"
|
@row-click="clickTodoStock"
|
:header-cell-style="lineSideWarehouseTableHeaderCellStyle"
|
stripe
|
class="feed-table line-side-warehouse-content"
|
>
|
<el-table-column type="selection" width="45"></el-table-column>
|
<el-table-column label="序号" prop="No" align="center" width="50">
|
<template slot="header">
|
<div style="line-height: 14px;">序号</div>
|
</template>
|
<template slot-scope="scope">
|
<span>{{ scope.$index + 1 }}</span>
|
</template>
|
</el-table-column>
|
<el-table-column
|
label="零件编号"
|
prop="partNo"
|
align="center"
|
:show-overflow-tooltip="true"
|
>
|
<template slot="header">
|
<div style="line-height: 14px;">零件编号</div>
|
<div class="th" @click.stop>
|
<el-input
|
type="text"
|
v-model="queryTodoParam.partNo"
|
@keyup.enter.native="handleTodoStockList"
|
clearable
|
@clear="handleTodoStockList"
|
size="mini"
|
></el-input>
|
</div>
|
</template>
|
<template slot-scope="scope">
|
<span>{{ scope.row.partNo }}</span>
|
</template>
|
</el-table-column>
|
<el-table-column
|
label="零件"
|
prop="partName"
|
align="center"
|
:show-overflow-tooltip="true"
|
>
|
<template slot="header">
|
<div style="line-height: 14px;">零件</div>
|
<div class="th" @click.stop>
|
<el-input
|
type="text"
|
v-model="queryTodoParam.partName"
|
@keyup.enter.native="handleTodoStockList"
|
clearable
|
@clear="handleTodoStockList"
|
size="mini"
|
></el-input>
|
</div>
|
</template>
|
<template slot-scope="scope">
|
<span>{{ scope.row.partName }}</span>
|
</template>
|
</el-table-column>
|
<el-table-column
|
label="零件描述"
|
prop="partDescription"
|
align="center"
|
>
|
<template slot="header">
|
<div style="line-height: 14px;">零件描述</div>
|
<div class="th" @click.stop>
|
<el-input
|
type="text"
|
v-model="queryTodoParam.partDescription"
|
@keyup.enter.native="handleTodoStockList"
|
clearable
|
@clear="handleTodoStockList"
|
size="mini"
|
></el-input>
|
</div>
|
</template>
|
<template slot-scope="scope">
|
<span>{{ scope.row.partDescription }}</span>
|
</template>
|
</el-table-column>
|
<el-table-column
|
label="IFS批次号"
|
prop="ifsBatchNo"
|
align="center"
|
show-overflow-tooltip
|
>
|
<template slot="header">
|
<!-- <div style="line-height: 14px;">IFS批次号</div> -->
|
<div class="th" @click.stop>
|
<el-input
|
type="text"
|
v-model="queryTodoParam.ifsBatchNo"
|
@keyup.enter.native="handleTodoStockList"
|
clearable
|
@clear="handleTodoStockList"
|
size="mini"
|
></el-input>
|
</div>
|
</template>
|
<template slot-scope="scope">
|
<span>{{ scope.row.ifsBatchNo }}</span>
|
</template>
|
</el-table-column>
|
<el-table-column
|
label="SN号"
|
prop="partBatchNo"
|
align="center"
|
show-overflow-tooltip
|
>
|
<template slot="header">
|
<div style="line-height: 14px;">SN号</div>
|
<div class="th" @click.stop>
|
<el-input
|
type="text"
|
v-model="queryTodoParam.partBatchNo"
|
@keyup.enter.native="handleTodoStockList"
|
clearable
|
@clear="handleTodoStockList"
|
size="mini"
|
></el-input>
|
</div>
|
</template>
|
<template slot-scope="scope">
|
<span>{{ scope.row.partBatchNo }}</span>
|
</template>
|
</el-table-column>
|
<el-table-column
|
label="载具编号"
|
prop="reelNumber"
|
align="center"
|
:show-overflow-tooltip="true"
|
>
|
<template slot="header">
|
<div style="line-height: 14px;">载具编号</div>
|
<div class="th" @click.stop>
|
<el-input
|
type="text"
|
v-model="queryTodoParam.reelNumber"
|
@keyup.enter.native="handleTodoStockList"
|
clearable
|
@clear="handleTodoStockList"
|
size="mini"
|
></el-input>
|
</div>
|
</template>
|
<template slot-scope="scope">
|
<span>{{ scope.row.reelNumber }}</span>
|
</template>
|
</el-table-column>
|
<el-table-column
|
label="规格型号"
|
prop="specs"
|
align="center"
|
:show-overflow-tooltip="true"
|
>
|
<template slot="header">
|
<div style="line-height: 14px;">规格型号</div>
|
<div class="th" @click.stop>
|
<el-input
|
type="text"
|
v-model="queryTodoParam.specs"
|
@keyup.enter.native="handleTodoStockList"
|
clearable
|
@clear="handleTodoStockList"
|
size="mini"
|
></el-input>
|
</div>
|
</template>
|
<template slot-scope="scope">
|
<span>{{ scope.row.specs }}</span>
|
</template>
|
</el-table-column>
|
<el-table-column label="单位" prop="unit" align="center">
|
<template slot="header">
|
<div style="line-height: 14px;">单位</div>
|
<div class="th" @click.stop>
|
<el-input
|
type="text"
|
v-model="queryTodoParam.unit"
|
@keyup.enter.native="handleTodoStockList"
|
clearable
|
@clear="handleTodoStockList"
|
size="mini"
|
></el-input>
|
</div>
|
</template>
|
<template slot-scope="scope">
|
<span>{{ scope.row.unit }}</span>
|
</template>
|
</el-table-column>
|
<el-table-column
|
label="可用数量"
|
prop="availableStockQuantity"
|
align="center"
|
>
|
<template slot="header">
|
<div style="line-height: 14px;">可用数量</div>
|
<div class="th" @click.stop>
|
<el-input
|
type="text"
|
v-model="queryTodoParam.availableStockQuantity"
|
@keyup.enter.native="handleTodoStockList"
|
clearable
|
@clear="handleTodoStockList"
|
size="mini"
|
></el-input>
|
</div>
|
</template>
|
<template slot-scope="scope">
|
<span>{{ scope.row.availableStockQuantity }}</span>
|
</template>
|
</el-table-column>
|
<el-table-column label="库存数量" prop="stockQuantity" align="center">
|
<template slot="header">
|
<div style="line-height: 14px;">库存数量</div>
|
<div class="th" @click.stop>
|
<el-input
|
type="text"
|
v-model="queryTodoParam.stockQuantity"
|
@keyup.enter.native="handleTodoStockList"
|
clearable
|
@clear="handleTodoStockList"
|
size="mini"
|
></el-input>
|
</div>
|
</template>
|
<template slot-scope="scope">
|
<span>{{ scope.row.stockQuantity }}</span>
|
</template>
|
</el-table-column>
|
<el-table-column
|
label="预留数量"
|
prop="reserveQuantity"
|
align="center"
|
>
|
<template slot="header">
|
<div style="line-height: 14px;">预留数量</div>
|
<div class="th" @click.stop>
|
<el-input
|
type="text"
|
v-model="queryTodoParam.reserveQuantity"
|
@keyup.enter.native="handleTodoStockList"
|
clearable
|
@clear="handleTodoStockList"
|
size="mini"
|
></el-input>
|
</div>
|
</template>
|
<template slot-scope="scope">
|
<span>{{ scope.row.reserveQuantity }}</span>
|
</template>
|
</el-table-column>
|
<el-table-column label="库位号" prop="locationNo" align="center">
|
<template slot="header">
|
<div style="line-height: 14px;">库位号</div>
|
<div class="th" @click.stop>
|
<el-input
|
type="text"
|
v-model="queryTodoParam.locationNo"
|
@keyup.enter.native="handleTodoStockList"
|
clearable
|
@clear="handleTodoStockList"
|
size="mini"
|
></el-input>
|
</div>
|
</template>
|
<template slot-scope="scope">
|
<span>{{ scope.row.locationNo }}</span>
|
</template>
|
</el-table-column>
|
</el-table>
|
<div class="pagin-page" style="margin-top: 0px;margin-bottom: 0px;">
|
<el-pagination
|
:current-page="queryTodoReport.current"
|
:page-sizes="[10, 15, 20, 50, 100]"
|
:page-size="queryTodoReport.size"
|
layout="total, sizes, prev, pager, next, jumper"
|
@size-change="handleTodoSizeChangeReport"
|
@current-change="handleTodoCurrentChangeReport"
|
:total="queryTodoReport.total"
|
>
|
</el-pagination>
|
</div>
|
</el-tab-pane>
|
<!-- -->
|
|
<el-tab-pane name="third" label="配盘物料">
|
<div class="task-reserve-warehouse-header">
|
<div>
|
<el-divider class="pane-divider" direction="vertical"></el-divider
|
><span style="font-size:14px;font-weight:bold">预留物料</span>
|
</div>
|
<div>
|
<el-button
|
v-if="permissions.product_feed_scan"
|
class="feeding-btn"
|
type="primary"
|
icon="feed-btn-feeding"
|
@click="scanAddERPFeed(0)"
|
>扫码投料</el-button
|
>
|
<el-button
|
class="feeding-btn"
|
type="primary"
|
icon="feed-btn-feeding"
|
@click="addReserve(0)"
|
>投料</el-button
|
>
|
</div>
|
</div>
|
<el-table
|
ref="reserveTable"
|
:summary-method="getReserveSummaries"
|
show-summary
|
:data="reserveList"
|
@selection-change="selectionReserveChange"
|
height="250px"
|
@row-click="clickReserve"
|
:header-cell-style="taskReserveWarehouseTableHeaderCellStyle"
|
:row-class-name="taskReserveWarehouseTableRowClassName"
|
class="feed-table task-reserve-warehouse-content"
|
>
|
<el-table-column type="selection" width="45"></el-table-column>
|
<el-table-column label="序号" prop="No" align="center" width="50">
|
<template slot="header">
|
<div style="line-height: 14px;">序号</div>
|
</template>
|
<template slot-scope="scope">
|
<span>{{ scope.$index + 1 }}</span>
|
</template>
|
</el-table-column>
|
<el-table-column
|
label="零件编号"
|
prop="partNo"
|
align="center"
|
:show-overflow-tooltip="true"
|
>
|
<template slot="header" slot-scope="scope">
|
<div style="line-height: 14px;">零件编号</div>
|
<div class="th" @click.stop>
|
<el-input
|
type="text"
|
v-model="queryParamFour.partNo"
|
@keyup.enter.native="handleReserveList"
|
clearable
|
@clear="handleReserveList"
|
size="mini"
|
></el-input>
|
</div>
|
</template>
|
<template slot-scope="scope">
|
<span>{{ scope.row.partNo }}</span>
|
</template>
|
</el-table-column>
|
<el-table-column
|
label="零件"
|
prop="partName"
|
align="center"
|
:show-overflow-tooltip="true"
|
>
|
<template slot="header" slot-scope="scope">
|
<div style="line-height: 14px;">零件</div>
|
<div class="th" @click.stop>
|
<el-input
|
type="text"
|
v-model="queryParamFour.partName"
|
@keyup.enter.native="handleReserveList"
|
clearable
|
@clear="handleReserveList"
|
size="mini"
|
></el-input>
|
</div>
|
</template>
|
<template slot-scope="scope">
|
<span>{{ scope.row.partName }}</span>
|
</template>
|
</el-table-column>
|
<!-- <el-table-column label="IFS批次号" prop="ifsBatchNo" align="center">-->
|
<!-- <template slot="header" slot-scope="scope">-->
|
<!-- <div style="line-height: 14px;">IFS批次号</div>-->
|
<!-- <div class="th" @click.stop>-->
|
<!-- <el-input-->
|
<!-- type="text"-->
|
<!-- v-model="queryParamFour.ifsBatchNo"-->
|
<!-- @keyup.enter.native="handleReserveList"-->
|
<!-- clearable-->
|
<!-- @clear="handleReserveList"-->
|
<!-- size="mini"-->
|
<!-- ></el-input>-->
|
<!-- </div>-->
|
<!-- </template>-->
|
<!-- <template slot-scope="scope">-->
|
<!-- <span>{{ scope.row.ifsBatchNo }}</span>-->
|
<!-- </template>-->
|
<!-- </el-table-column>-->
|
<el-table-column label="SN号" prop="partBatchNo" align="center">
|
<template slot="header" slot-scope="scope">
|
<div style="line-height: 14px;">SN号</div>
|
<div class="th" @click.stop>
|
<el-input
|
type="text"
|
v-model="queryParamFour.partBatchNo"
|
@keyup.enter.native="handleReserveList"
|
clearable
|
@clear="handleReserveList"
|
size="mini"
|
></el-input>
|
</div>
|
</template>
|
<template slot-scope="scope">
|
<span>{{ scope.row.partBatchNo }}</span>
|
</template>
|
</el-table-column>
|
<el-table-column
|
label="载具编号"
|
prop="reelNumber"
|
align="center"
|
:show-overflow-tooltip="true"
|
>
|
<template slot="header" slot-scope="scope">
|
<div style="line-height: 14px;">载具编号</div>
|
<div class="th" @click.stop>
|
<el-input
|
type="text"
|
v-model="queryParamFour.reelNumber"
|
@keyup.enter.native="handleReserveList"
|
clearable
|
@clear="handleReserveList"
|
size="mini"
|
></el-input>
|
</div>
|
</template>
|
<template slot-scope="scope">
|
<span>{{ scope.row.reelNumber }}</span>
|
</template>
|
</el-table-column>
|
<el-table-column
|
label="仓库"
|
prop="warehouseName"
|
align="center"
|
:show-overflow-tooltip="true"
|
>
|
<template slot="header" slot-scope="scope">
|
<div style="line-height: 14px;">仓库</div>
|
<div class="th" @click.stop>
|
<el-input
|
type="text"
|
v-model="queryParamFour.warehouseName"
|
@keyup.enter.native="handleReserveList"
|
clearable
|
@clear="handleReserveList"
|
size="mini"
|
></el-input>
|
</div>
|
</template>
|
<template slot-scope="scope">
|
<span>{{ scope.row.warehouseName }}</span>
|
</template>
|
</el-table-column>
|
<el-table-column label="库位号" prop="locationNo" align="center">
|
<template slot="header" slot-scope="scope">
|
<div style="line-height: 14px;">库位号</div>
|
<div class="th" @click.stop>
|
<el-input
|
type="text"
|
v-model="queryParamFour.locationNo"
|
@keyup.enter.native="handleReserveList"
|
clearable
|
@clear="handleReserveList"
|
size="mini"
|
></el-input>
|
</div>
|
</template>
|
<template slot-scope="scope">
|
<span>{{ scope.row.locationNo }}</span>
|
</template>
|
</el-table-column>
|
<el-table-column
|
label="预留数量"
|
prop="reservedQuantity"
|
align="center"
|
>
|
<template slot="header" slot-scope="scope">
|
<div style="line-height: 14px;">预留数量</div>
|
<div class="th" @click.stop>
|
<el-input
|
type="text"
|
v-model="queryParamFour.reservedQuantity"
|
@keyup.enter.native="handleReserveList"
|
clearable
|
@clear="handleReserveList"
|
size="mini"
|
></el-input>
|
</div>
|
</template>
|
<template slot-scope="scope">
|
<span>{{ scope.row.reservedQuantity }}</span>
|
</template>
|
</el-table-column>
|
<el-table-column label="单位" prop="partUnit" align="center">
|
<template slot="header" slot-scope="scope">
|
<div style="line-height: 14px;">单位</div>
|
<div class="th" @click.stop>
|
<el-input
|
type="text"
|
v-model="queryParamFour.partUnit"
|
@keyup.enter.native="handleReserveList"
|
clearable
|
@clear="handleReserveList"
|
size="mini"
|
></el-input>
|
</div>
|
</template>
|
<template slot-scope="scope">
|
<span>{{ scope.row.partUnit }}</span>
|
</template>
|
</el-table-column>
|
</el-table>
|
</el-tab-pane>
|
|
<el-tab-pane name="four" label="ERP物料">
|
<div class="task-reserve-warehouse-header">
|
<div>
|
<el-divider class="pane-divider" direction="vertical"></el-divider
|
><span style="font-size:14px;font-weight:bold">ERP物料</span>
|
</div>
|
<div>
|
<el-button
|
v-if="permissions.product_feed_scan"
|
class="feeding-btn"
|
type="primary"
|
icon="feed-btn-feeding"
|
@click="scanAddERPFeed(1)"
|
>扫码投料</el-button
|
>
|
<el-button
|
class="feeding-btn"
|
type="primary"
|
icon="feed-btn-feeding"
|
@click="addReserve(1)"
|
>投料</el-button
|
>
|
</div>
|
</div>
|
<el-table
|
ref="reserveTable1"
|
:summary-method="getReserveSummaries"
|
show-summary
|
:data="reserveList1"
|
@selection-change="selectionReserveChange"
|
height="250px"
|
@row-click="clickReserve"
|
:header-cell-style="taskReserveWarehouseTableHeaderCellStyle"
|
:row-class-name="taskReserveWarehouseTableRowClassName"
|
class="feed-table task-reserve-warehouse-content"
|
>
|
<el-table-column type="selection" width="45"></el-table-column>
|
<el-table-column label="序号" prop="No" align="center" width="50">
|
<template slot-scope="scope">
|
<span>{{ scope.$index + 1 }}</span>
|
</template>
|
</el-table-column>
|
<el-table-column
|
label="零件编号"
|
prop="partNo"
|
align="center"
|
:show-overflow-tooltip="true"
|
>
|
<template slot-scope="scope">
|
<span>{{ scope.row.partNo }}</span>
|
</template>
|
</el-table-column>
|
<el-table-column
|
label="零件"
|
prop="partName"
|
align="center"
|
:show-overflow-tooltip="true"
|
>
|
<template slot-scope="scope">
|
<span>{{ scope.row.partName }}</span>
|
</template>
|
</el-table-column>
|
|
<el-table-column label="SN号" prop="partBatchNo" align="center">
|
<template slot-scope="scope">
|
<span>{{ scope.row.partBatchNo }}</span>
|
</template>
|
</el-table-column>
|
<el-table-column
|
label="载具编号"
|
prop="reelNumber"
|
align="center"
|
:show-overflow-tooltip="true"
|
>
|
<template slot-scope="scope">
|
<span>{{ scope.row.reelNumber }}</span>
|
</template>
|
</el-table-column>
|
<el-table-column
|
label="仓库"
|
prop="warehouseName"
|
align="center"
|
:show-overflow-tooltip="true"
|
>
|
<template slot-scope="scope">
|
<span>{{ scope.row.warehouseName }}</span>
|
</template>
|
</el-table-column>
|
<el-table-column label="库位号" prop="locationNo" align="center">
|
<template slot-scope="scope">
|
<span>{{ scope.row.locationNo }}</span>
|
</template>
|
</el-table-column>
|
<el-table-column label="库存数量" prop="stockQuantity" align="center">
|
<template slot-scope="scope">
|
<span>{{ scope.row.stockQuantity }}</span>
|
</template>
|
</el-table-column>
|
<el-table-column label="单位" prop="unit" align="center">
|
<template slot-scope="scope">
|
<span>{{ scope.row.unit }}</span>
|
</template>
|
</el-table-column>
|
</el-table>
|
</el-tab-pane>
|
</el-tabs>
|
<div class="workstation-house-header">
|
<div>
|
<el-divider class="pane-divider" direction="vertical"></el-divider
|
><span style="font-size:14px;font-weight:bold">已投入未消耗物料</span>
|
</div>
|
<div>
|
<el-button
|
class="return-btn"
|
type="primary"
|
icon="feed-btn-return"
|
@click="returnMaterial()"
|
>退回</el-button
|
>
|
</div>
|
</div>
|
<el-table
|
ref="feedTable"
|
:summary-method="getSum"
|
show-summary
|
:data="feedList"
|
@selection-change="selectionFeedChange"
|
height="220"
|
@row-click="clickFeed"
|
:header-cell-style="workstationHouseTableHeaderCellStyle"
|
:row-class-name="workstationHouseTableRowClassName"
|
class="feed-table workstation-house-content"
|
>
|
<el-table-column type="selection" width="45"></el-table-column>
|
<el-table-column label="序号" prop="No" align="center" width="50">
|
<template slot="header" slot-scope="scope">
|
<div style="line-height: 14px;">序号</div>
|
</template>
|
<template slot-scope="scope">
|
<span>{{ scope.$index + 1 }}</span>
|
</template>
|
</el-table-column>
|
<el-table-column
|
label="零件编号"
|
prop="partNo"
|
align="center"
|
:show-overflow-tooltip="true"
|
>
|
<template slot="header" slot-scope="scope">
|
<div style="line-height: 14px;">零件编号</div>
|
<div class="th" @click.stop>
|
<el-input
|
type="text"
|
v-model="queryParamThree.partNo"
|
@keyup.enter.native="handleFeedList"
|
clearable
|
@clear="handleFeedList"
|
size="mini"
|
></el-input>
|
</div>
|
</template>
|
<template slot-scope="scope">
|
<span>{{ scope.row.partNo }}</span>
|
</template>
|
</el-table-column>
|
<el-table-column
|
label="零件"
|
prop="partName"
|
align="center"
|
:show-overflow-tooltip="true"
|
>
|
<template slot="header" slot-scope="scope">
|
<div style="line-height: 14px;">零件</div>
|
<div class="th" @click.stop>
|
<el-input
|
type="text"
|
v-model="queryParamThree.partName"
|
@keyup.enter.native="handleFeedList"
|
clearable
|
@clear="handleFeedList"
|
size="mini"
|
></el-input>
|
</div>
|
</template>
|
<template slot-scope="scope">
|
<span>{{ scope.row.partName }}</span>
|
</template>
|
</el-table-column>
|
<el-table-column label="IFS批次号" prop="ifsBatchNo" align="center">
|
<template slot="header" slot-scope="scope">
|
<div style="line-height: 14px;">IFS批次号</div>
|
<div class="th" @click.stop>
|
<el-input
|
type="text"
|
v-model="queryParamThree.ifsBatchNo"
|
@keyup.enter.native="handleFeedList"
|
clearable
|
@clear="handleFeedList"
|
size="mini"
|
></el-input>
|
</div>
|
</template>
|
<template slot-scope="scope">
|
<span>{{ scope.row.ifsBatchNo }}</span>
|
</template>
|
</el-table-column>
|
<el-table-column label="SN号" prop="partBatchNo" align="center">
|
<template slot="header" slot-scope="scope">
|
<div style="line-height: 14px;">SN号</div>
|
<div class="th" @click.stop>
|
<el-input
|
type="text"
|
v-model="queryParamThree.partBatchNo"
|
@keyup.enter.native="handleFeedList"
|
clearable
|
@clear="handleFeedList"
|
size="mini"
|
></el-input>
|
</div>
|
</template>
|
<template slot-scope="scope">
|
<span>{{ scope.row.partBatchNo }}</span>
|
</template>
|
</el-table-column>
|
<el-table-column
|
label="载具编号"
|
prop="reelNumber"
|
align="center"
|
:show-overflow-tooltip="true"
|
>
|
<template slot="header" slot-scope="scope">
|
<div style="line-height: 14px;">载具编号</div>
|
<div class="th" @click.stop>
|
<el-input
|
type="text"
|
v-model="queryParamThree.reelNumber"
|
@keyup.enter.native="handleFeedList"
|
clearable
|
@clear="handleFeedList"
|
size="mini"
|
></el-input>
|
</div>
|
</template>
|
<template slot-scope="scope">
|
<span>{{ scope.row.reelNumber }}</span>
|
</template>
|
</el-table-column>
|
<el-table-column
|
label="规格型号"
|
prop="specs"
|
align="center"
|
:show-overflow-tooltip="true"
|
>
|
<template slot="header" slot-scope="scope">
|
<div style="line-height: 14px;">规格型号</div>
|
<div class="th" @click.stop>
|
<el-input
|
type="text"
|
v-model="queryParamThree.specs"
|
@keyup.enter.native="handleFeedList"
|
clearable
|
@clear="handleFeedList"
|
size="mini"
|
></el-input>
|
</div>
|
</template>
|
<template slot-scope="scope">
|
<span>{{ scope.row.specs }}</span>
|
</template>
|
</el-table-column>
|
<el-table-column
|
label="可用数量"
|
prop="availableStockQuantity"
|
align="center"
|
>
|
<template slot="header" slot-scope="scope">
|
<div style="line-height: 14px;">可用数量</div>
|
<div class="th" @click.stop>
|
<el-input
|
type="text"
|
v-model="queryParamThree.availableStockQuantity"
|
@keyup.enter.native="handleFeedList"
|
clearable
|
@clear="handleFeedList"
|
size="mini"
|
></el-input>
|
</div>
|
</template>
|
<template slot-scope="scope">
|
<span>{{ scope.row.availableStockQuantity }}</span>
|
</template>
|
</el-table-column>
|
<el-table-column label="库存数量" prop="stockQuantity" align="center">
|
<template slot="header" slot-scope="scope">
|
<div style="line-height: 14px;">库存数量</div>
|
<div class="th" @click.stop>
|
<el-input
|
type="text"
|
v-model="queryParamThree.stockQuantity"
|
@keyup.enter.native="handleFeedList"
|
clearable
|
@clear="handleFeedList"
|
size="mini"
|
></el-input>
|
</div>
|
</template>
|
<template slot-scope="scope">
|
<span>{{ scope.row.stockQuantity }}</span>
|
</template>
|
</el-table-column>
|
<el-table-column label="库位号" prop="locNo" align="center">
|
<template slot="header" slot-scope="scope">
|
<div style="line-height: 14px;">库位号</div>
|
<div class="th" @click.stop>
|
<el-input
|
type="text"
|
v-model="queryParamThree.locNo"
|
@keyup.enter.native="handleFeedList"
|
clearable
|
@clear="handleFeedList"
|
size="mini"
|
></el-input>
|
</div>
|
</template>
|
<template slot-scope="scope">
|
<span>{{ scope.row.locNo }}</span>
|
</template>
|
</el-table-column>
|
<el-table-column label="单位" prop="unit" align="center">
|
<template slot="header" slot-scope="scope">
|
<div style="line-height: 14px;">单位</div>
|
<div class="th" @click.stop>
|
<el-input
|
type="text"
|
v-model="queryParamThree.unit"
|
@keyup.enter.native="handleFeedList"
|
clearable
|
@clear="handleFeedList"
|
size="mini"
|
></el-input>
|
</div>
|
</template>
|
<template slot-scope="scope">
|
<span>{{ scope.row.unit }}</span>
|
</template>
|
</el-table-column>
|
<el-table-column label="投料人" prop="createUser" align="center">
|
<template slot="header" slot-scope="scope">
|
<div style="line-height: 14px;">投料人</div>
|
<div class="th" @click.stop>
|
<el-input
|
type="text"
|
v-model="queryParamThree.createUser"
|
@keyup.enter.native="handleFeedList"
|
clearable
|
@clear="handleFeedList"
|
size="mini"
|
></el-input>
|
</div>
|
</template>
|
<template slot-scope="scope">
|
<span>{{ scope.row.createUser }}</span>
|
</template>
|
</el-table-column>
|
<el-table-column
|
label="投料时间"
|
prop="createTime"
|
align="center"
|
:show-overflow-tooltip="true"
|
width="145px"
|
>
|
<template slot="header" slot-scope="scope">
|
<div style="line-height: 14px;">投料时间</div>
|
<div class="th" @click.stop>
|
<el-date-picker
|
clearable
|
v-model="queryParamThree.createTime"
|
type="datetimerange"
|
range-separator="-"
|
start-placeholder="开始"
|
end-placeholder="结束"
|
value-format="yyyy-MM-dd HH:mm:ss"
|
@change="feedDateChange($event)"
|
size="mini"
|
style="width:100px"
|
>
|
</el-date-picker>
|
</div>
|
</template>
|
<template slot-scope="scope">
|
<span>{{ scope.row.createTime }}</span>
|
</template>
|
</el-table-column>
|
</el-table>
|
<feedFormDialog
|
:currshowlist.sync="showFeedForm"
|
:dataList="activeName === 'first' ? selectStocks : selectTodoStocks"
|
:workstationId="workstationId"
|
:operationTaskId="currOperateTask.id"
|
@refreshFeedList="refreshFeedAndStock"
|
/>
|
<returnMaterialFormDialog
|
:currshowlist.sync="showReturnMaterialForm"
|
:dataList="selectFeeds"
|
:workstationId="workstationId"
|
@refreshFeedList="refreshFeedAndStock"
|
/>
|
<reserveFeedFormDialog
|
:currshowlist.sync="showReserveFeedForm"
|
:dataList="selectReserves"
|
:workstationId="workstationId"
|
:operationTaskId="currOperateTask.id"
|
:isErp="activeName === 'four'"
|
:partId="currentMaterialPartId"
|
@refreshFeedList="refreshFeedAndStock"
|
/>
|
|
<scanFeedFormDialog
|
:currshowlist.sync="showScanFeedForm"
|
:materialList="materialList"
|
:paramObject="paramObject"
|
:isOk="activeName === 'first'"
|
:workstationId="workstationId"
|
:operationTaskId="currOperateTask.id"
|
@refreshFeedList="refreshFeedAndStock"
|
/>
|
<scanFeedERPFormDialog
|
:currshowlist.sync="showScanFeedErpForm"
|
:materialList="materialList"
|
:paramObject="paramObject"
|
:activeName="activeName"
|
:workstationId="workstationId"
|
:operationTaskId="currOperateTask.id"
|
@refreshFeedList="refreshFeedAndStock"
|
/>
|
</div>
|
</template>
|
|
<script>
|
import { getStock, getFeed, getTodoStock } from '@/api/product/personboard'
|
import { getMaterial } from '@/api/plan/operationtask'
|
import {
|
getERPStockListByPart,
|
fetchList
|
} from '@/api/warehouse/joinstockorder'
|
import feedFormDialog from './feed-form'
|
import returnMaterialFormDialog from './returnmaterial-form'
|
import reserveFeedFormDialog from './reserve-feed-form'
|
import scanFeedFormDialog from './scan-feed-form'
|
import scanFeedERPFormDialog from './scan-feed-erp-form'
|
import { mapGetters } from 'vuex'
|
|
export default {
|
components: {
|
feedFormDialog,
|
returnMaterialFormDialog,
|
reserveFeedFormDialog,
|
scanFeedFormDialog,
|
scanFeedERPFormDialog
|
},
|
props: {
|
workstationId: {
|
type: Number
|
},
|
currOperateTask: {
|
type: Object,
|
default: function() {
|
return {}
|
}
|
},
|
currItem: {
|
type: String,
|
default: null
|
}
|
},
|
data() {
|
return {
|
materialList: [],
|
reserveList1: [],
|
activeName: 'first',
|
stockList: [],
|
stockTodoList: [],
|
feedList: [],
|
reserveList: [],
|
selectStocks: [],
|
selectTodoStocks: [],
|
selectFeeds: [],
|
selectReserves: [],
|
showFeedForm: false,
|
showReturnMaterialForm: false,
|
showReserveFeedForm: false,
|
currentMaterialPartId: 0,
|
paramObject: null,
|
queryParamOne: {
|
partNo: null,
|
partName: null,
|
qpa: null,
|
quantityRequired: null,
|
unit: null
|
},
|
queryParamTwo: {},
|
queryParamThree: {},
|
queryParamFour: {},
|
queryTodoParam: {},
|
dateTimeFiltersThree: {},
|
queryReport: {
|
current: 1,
|
size: 10,
|
total: 0
|
},
|
queryTodoReport: {
|
current: 1,
|
size: 10,
|
total: 0
|
},
|
reportAllData: [], // 存放原始数据
|
showScanFeedForm: false,
|
showScanFeedErpForm: false
|
}
|
},
|
created() {
|
this.$nextTick(() => {
|
if (this.currItem != null && this.currItem === 'feed') {
|
this.loadStockByWorkstation()
|
this.loadTodoStockByWorkstation()
|
this.loadFeedByWorkstation(this.workstationId)
|
}
|
})
|
},
|
updated() {
|
this.$nextTick(() => {
|
this.$refs.feedTable.doLayout()
|
this.$refs.stockTable.doLayout()
|
this.$refs.stockTodoTable.doLayout()
|
})
|
},
|
computed: {
|
...mapGetters(['permissions'])
|
},
|
methods: {
|
// 根据工作站,加载线边仓信息
|
loadStockByWorkstation() {
|
this.stockList = []
|
if (this.workstationId && this.workstationId != null) {
|
var query = Object.assign(
|
{ current: this.queryReport.current, size: this.queryReport.size },
|
{ workstationId: this.workstationId },
|
this.paramObject,
|
this.queryParamTwo
|
)
|
getStock(query)
|
.then((response) => {
|
var data = response.data
|
if (data.code === 0) {
|
// const list = data.data.records
|
this.stockList = data.data.records
|
this.queryReport.total = data.data.total
|
// this.getReportData()
|
} else {
|
this.$message.error('获取线边仓信息失败')
|
}
|
})
|
.catch((error) => {
|
console.log(error)
|
})
|
}
|
},
|
|
// 根据工作站,加载待处理线边仓信息
|
loadTodoStockByWorkstation() {
|
this.stockTodoList = []
|
if (this.workstationId) {
|
var query = Object.assign(
|
{
|
current: this.queryTodoReport.current,
|
size: this.queryTodoReport.size
|
},
|
{ workstationId: this.workstationId },
|
this.paramObject,
|
this.queryTodoParam
|
)
|
getTodoStock(query)
|
.then((response) => {
|
var data = response.data
|
if (data.code === 0) {
|
this.stockTodoList = data.data.records
|
this.queryTodoReport.total = data.data.total
|
} else {
|
this.$message.error('获取线边仓信息失败')
|
}
|
})
|
.catch((error) => {
|
console.log(error)
|
})
|
}
|
},
|
// 选择工单所需物料
|
changeMaterial(material) {
|
if (
|
material &&
|
material.partId &&
|
material.partId !== this.currentMaterialPartId
|
) {
|
this.currentMaterialPartId = material.partId
|
} else {
|
this.currentMaterialPartId = 0
|
this.$refs.materialTable.setCurrentRow(-1)
|
}
|
},
|
|
needFeedsTableHeaderCellStyle({ row, column, rowIndex, columnIndex }) {
|
let headerStyle = 'background:#599ef4;color:#fff;'
|
if (columnIndex === 0) {
|
headerStyle += 'border-radius: 6px 0px 0px 0px;'
|
} else if (columnIndex === 4) {
|
headerStyle += 'border-radius: 0px 6px 0px 0px;'
|
}
|
return headerStyle
|
},
|
needFeedsTableRowClassName({ row, rowIndex }) {
|
if (rowIndex % 2 === 1) {
|
return 'stripe-row'
|
} else {
|
return ''
|
}
|
},
|
lineSideWarehouseTableHeaderCellStyle({
|
row,
|
column,
|
rowIndex,
|
columnIndex
|
}) {
|
let headerStyle = 'background:#599ef4;color:#fff;'
|
if (columnIndex === 0) {
|
headerStyle += 'border-radius: 6px 0px 0px 0px;'
|
} else if (columnIndex === 12) {
|
headerStyle += 'border-radius: 0px 6px 0px 0px;'
|
}
|
return headerStyle
|
},
|
lineSideWarehouseTableRowClassName({ row, rowIndex }) {
|
if (rowIndex % 2 === 1) {
|
return 'stripe-row'
|
} else {
|
return ''
|
}
|
},
|
// 线边仓已有物料合计
|
getSummaries(param) {
|
const { columns, data } = param
|
const sums = []
|
columns.forEach((column, index) => {
|
if (index === 0) {
|
sums[index] = '合计'
|
return
|
}
|
const values = data.map((item) => Number(item[column.property]))
|
if (
|
column.property === 'availableStockQuantity' ||
|
column.property === 'stockQuantity' ||
|
column.property === 'reserveQuantity'
|
) {
|
if (!values.every((value) => isNaN(value))) {
|
sums[index] = values.reduce((prev, curr) => {
|
const value = Number(curr)
|
if (!isNaN(value)) {
|
return Number((prev + curr).toFixed(6))
|
} else {
|
return prev
|
}
|
}, 0)
|
} else {
|
sums[index] = ''
|
}
|
} else {
|
sums[index] = ''
|
}
|
})
|
return sums
|
},
|
// 选择线边仓零件
|
selectionStockChange(val) {
|
this.selectStocks = val
|
},
|
selectionTodoStockChange(val) {
|
this.selectTodoStocks = val
|
},
|
clickStock(row) {
|
this.$refs.stockTable.toggleRowSelection(row)
|
},
|
clickTodoStock(row) {
|
this.$refs.stockTodoTable.toggleRowSelection(row)
|
},
|
|
// 已投入未消耗物料合计
|
getSum(param) {
|
const { columns, data } = param
|
const sums = []
|
columns.forEach((column, index) => {
|
if (index === 0) {
|
sums[index] = '合计'
|
return
|
}
|
const values = data.map((item) => Number(item[column.property]))
|
if (
|
column.property === 'availableStockQuantity' ||
|
column.property === 'stockQuantity'
|
) {
|
if (!values.every((value) => isNaN(value))) {
|
sums[index] = values.reduce((prev, curr) => {
|
const value = Number(curr)
|
if (!isNaN(value)) {
|
return Number((prev + curr).toFixed(6))
|
} else {
|
return prev
|
}
|
}, 0)
|
} else {
|
sums[index] = ''
|
}
|
} else {
|
sums[index] = ''
|
}
|
})
|
return sums
|
},
|
// 选择投料零件
|
selectionFeedChange(val) {
|
this.selectFeeds = val
|
},
|
clickFeed(row) {
|
this.$refs.feedTable.toggleRowSelection(row)
|
},
|
|
workstationHouseTableHeaderCellStyle({
|
row,
|
column,
|
rowIndex,
|
columnIndex
|
}) {
|
let headerStyle = 'background:#599ef4;color:#fff;'
|
if (columnIndex === 0) {
|
headerStyle += 'border-radius: 6px 0px 0px 0px;'
|
} else if (columnIndex === 12) {
|
headerStyle += 'border-radius: 0px 6px 0px 0px;'
|
}
|
return headerStyle
|
},
|
workstationHouseTableRowClassName({ row, rowIndex }) {
|
if (rowIndex % 2 === 1) {
|
return 'stripe-row'
|
} else {
|
return ''
|
}
|
},
|
// 根据工作站,加载投料信息
|
loadFeedByWorkstation(stationId) {
|
this.feedList = []
|
if (stationId && stationId != null) {
|
const criteria = {}
|
criteria.dateTimeFilters = this.dateTimeFiltersThree
|
const query = Object.assign(
|
{ criteria: JSON.stringify(criteria) },
|
this.paramObject,
|
this.queryParamThree
|
)
|
getFeed(query, stationId)
|
.then((response) => {
|
var data = response.data
|
if (data.code === 0) {
|
this.feedList = data.data
|
} else {
|
this.$message.error('获取投料信息失败')
|
}
|
})
|
.catch((error) => {
|
console.log(error)
|
})
|
}
|
},
|
|
// 打开投料界面
|
addFeed() {
|
if (!this.currOperateTask.id) {
|
this.$message.warning('请选择工单')
|
return
|
}
|
const _this = this
|
const selectList =
|
this.activeName === 'first' ? _this.selectStocks : this.selectTodoStocks
|
if (selectList.length > 0) {
|
selectList.forEach(function(item) {
|
const material = _this.materialList.find((el) => {
|
return el.partNo == item.partNo
|
})
|
if (material) {
|
// if (material.quantityRequired > item.availableStockQuantity) {
|
_this.$set(item, 'suppliedQuantity', item.availableStockQuantity)
|
// }
|
// else {
|
// _this.$set(item, 'suppliedQuantity', material.quantityRequired)
|
// }
|
} else {
|
_this.$set(item, 'suppliedQuantity', item.availableStockQuantity)
|
}
|
})
|
this.showFeedForm = true
|
} else {
|
this.$message.warning('请选择线边仓零件')
|
}
|
},
|
scanAddFeed() {
|
if (!this.currOperateTask.id) {
|
this.$message.warning('请选择工单')
|
return
|
}
|
this.showScanFeedForm = true
|
},
|
scanAddERPFeed() {
|
if (!this.currOperateTask.id) {
|
this.$message.warning('请选择工单')
|
return
|
}
|
this.showScanFeedErpForm = true
|
},
|
|
// 刷新线边仓、投料列表
|
refreshFeedAndStock() {
|
this.queryReport.current = 1
|
this.queryTodoReport.current = 1
|
this.loadStockByWorkstation()
|
this.loadTodoStockByWorkstation()
|
this.loadFeedByWorkstation(this.workstationId)
|
this.loadReserveByTask()
|
},
|
// 打开退料界面
|
returnMaterial() {
|
if (this.selectFeeds.length > 0) {
|
var _this = this
|
var selectList = _this.selectFeeds
|
selectList.forEach(function(item) {
|
_this.$set(item, 'returnQuantity', item.availableStockQuantity)
|
})
|
this.showReturnMaterialForm = true
|
} else {
|
this.$message.warning('请选择投料零件')
|
}
|
},
|
// 初始化页面变量
|
initFeed() {
|
this.selectStocks = []
|
this.selectFeeds = []
|
this.selectReserves = []
|
this.showFeedForm = false
|
this.showReturnMaterialForm = false
|
this.showReserveFeedForm = false
|
},
|
// 在刷新工单所需物料列表数据
|
handleMaterialList() {
|
this.loadMaterialByOperateTask()
|
},
|
handleStockList() {
|
this.queryReport.current = 1
|
this.loadStockByWorkstation()
|
},
|
handleTodoStockList() {
|
this.queryTodoReport.current = 1
|
this.loadTodoStockByWorkstation()
|
},
|
handleFeedList() {
|
this.loadFeedByWorkstation(this.workstationId)
|
},
|
handleReserveList() {
|
this.loadReserveByTask()
|
},
|
loadMaterialByOperateTask() {
|
const query = Object.assign(
|
{ operationTaskId: this.currOperateTask.id },
|
this.queryParamOne
|
)
|
getMaterial(query).then((response) => {
|
this.materialList = response.data.data
|
})
|
},
|
feedDateChange(val) {
|
if (val != null) {
|
this.dateTimeFiltersThree.createTime = val
|
} else {
|
delete this.dateTimeFiltersThree.createTime
|
}
|
this.handleFeedList()
|
},
|
// 根据工单,加载工单预留物料
|
loadReserveByTask() {
|
this.reserveList = []
|
if (this.currOperateTask && this.currOperateTask.id != null) {
|
let partInfo = {}
|
if (this.paramObject != null) {
|
const partId = this.paramObject.partId
|
const part = this.materialList.find((item) => {
|
return item.partId === partId
|
})
|
if (part) {
|
partInfo = { partNo: part.partNo }
|
}
|
}
|
|
var query = Object.assign(
|
{ current: 1, size: 999, operationTaskId: this.currOperateTask.id },
|
partInfo,
|
this.queryParamFour
|
)
|
fetchList(query)
|
.then((response) => {
|
var data = response.data
|
if (data.code === 0) {
|
this.reserveList = data.data.records
|
} else {
|
this.$message.error('获取预留物料失败')
|
}
|
})
|
.catch((error) => {
|
console.log(error)
|
})
|
}
|
},
|
// 根据工单查询ERP库存
|
loadERPStore() {
|
const partId = this.paramObject.partId
|
if (!partId) return
|
const part = this.materialList.find((item) => {
|
return item.partId === partId
|
})
|
getERPStockListByPart({
|
partNo: part.partNo,
|
partBatchNo: part.partBatchNo
|
})
|
.then((resp) => {
|
const respCode = resp.data.code
|
const respData = resp.data.data
|
if (respCode === 0) {
|
this.reserveList1 = respData
|
} else {
|
this.isSubmit = false
|
this.$message.error('库存列表查询失败')
|
}
|
})
|
.catch(() => {
|
this.isSubmit = false
|
console.log('查询零件对应的库存列表时,发生错误')
|
})
|
},
|
taskReserveWarehouseTableHeaderCellStyle({
|
row,
|
column,
|
rowIndex,
|
columnIndex
|
}) {
|
let headerStyle = 'background:#599ef4;color:#fff;'
|
if (columnIndex === 0) {
|
headerStyle += 'border-radius: 6px 0px 0px 0px;'
|
} else if (columnIndex === 9) {
|
headerStyle += 'border-radius: 0px 6px 0px 0px;'
|
}
|
return headerStyle
|
},
|
taskReserveWarehouseTableRowClassName({ row, rowIndex }) {
|
if (rowIndex % 2 === 1) {
|
return 'stripe-row'
|
} else {
|
return ''
|
}
|
},
|
getReserveSummaries(param) {
|
const { columns, data } = param
|
const sums = []
|
columns.forEach((column, index) => {
|
if (index === 0) {
|
sums[index] = '合计'
|
return
|
}
|
const values = data.map((item) => Number(item[column.property]))
|
if (column.property === 'reservedQuantity') {
|
if (!values.every((value) => isNaN(value))) {
|
sums[index] = values.reduce((prev, curr) => {
|
const value = Number(curr)
|
if (!isNaN(value)) {
|
return Number((prev + curr).toFixed(6))
|
} else {
|
return prev
|
}
|
}, 0)
|
} else {
|
sums[index] = ''
|
}
|
} else {
|
sums[index] = ''
|
}
|
})
|
return sums
|
},
|
selectionReserveChange(val) {
|
this.selectReserves = val
|
},
|
clickReserve(row) {
|
this.$refs.reserveTable.toggleRowSelection(row)
|
},
|
clickReserve1(row) {
|
this.$refs.reserveTable1.toggleRowSelection(row)
|
},
|
// 打开预留投料页面
|
addReserve() {
|
if (!this.currOperateTask.id) {
|
this.$message.warning('请选择工单')
|
return
|
}
|
if (this.selectReserves.length > 0) {
|
var _that = this
|
var selectList = _that.selectReserves
|
selectList.forEach(function(item) {
|
_that.$set(item, 'suppliedQuantity', item.reservedQuantity)
|
})
|
this.showReserveFeedForm = true
|
} else {
|
this.$message.warning('请选择预留物料')
|
}
|
},
|
handleSizeChangeReport(val) {
|
this.queryReport.size = val
|
this.queryReport.current = 1
|
this.loadStockByWorkstation()
|
},
|
handleTodoSizeChangeReport(val) {
|
this.queryTodoReport.size = val
|
this.queryTodoReport.current = 1
|
this.loadStockByWorkstation()
|
},
|
|
handleCurrentChangeReport(val) {
|
this.queryReport.current = val
|
this.loadStockByWorkstation()
|
},
|
handleTodoCurrentChangeReport(val) {
|
this.queryTodoReport.current = val
|
this.loadTodoStockByWorkstation()
|
},
|
getReportData() {
|
const list = JSON.parse(JSON.stringify(this.reportAllData))
|
this.stockList = list.slice(
|
(this.queryReport.current - 1) * this.queryReport.size,
|
this.queryReport.current * this.queryReport.size
|
)
|
},
|
// 刷新所有列表的数据
|
refreshAllData() {
|
if (this.workstationId) {
|
this.queryReport.current = 1
|
this.queryTodoReport.current = 1
|
this.loadStockByWorkstation()
|
this.loadTodoStockByWorkstation()
|
this.loadFeedByWorkstation(this.workstationId)
|
} else {
|
this.stockList = []
|
this.stockTodoList = []
|
this.queryReport.total = 0
|
this.queryTodoReport.total = 0
|
this.feedList = []
|
}
|
if (this.currOperateTask.id) {
|
// 根据工单id查询工单所需物料、预留物料
|
this.loadMaterialByOperateTask()
|
this.loadReserveByTask()
|
} else {
|
this.materialList = []
|
this.reserveList = []
|
}
|
}
|
},
|
watch: {
|
workstationId() {
|
this.$nextTick(() => {
|
if (this.currItem != null && this.currItem === 'feed') {
|
if (this.workstationId) {
|
this.queryReport.current = 1
|
this.queryTodoReport.current = 1
|
this.loadStockByWorkstation()
|
this.loadTodoStockByWorkstation()
|
this.loadFeedByWorkstation(this.workstationId)
|
}
|
this.initFeed()
|
}
|
})
|
},
|
currOperateTask: {
|
handler(newValue, oldValue) {
|
this.$nextTick(() => {
|
if (this.currItem != null && this.currItem === 'feed') {
|
if (newValue.id) {
|
// 根据工单id查询工单所需物料、预留物料
|
this.loadMaterialByOperateTask()
|
this.loadReserveByTask()
|
} else {
|
this.materialList = []
|
this.reserveList = []
|
}
|
}
|
})
|
},
|
deep: true
|
},
|
currentMaterialPartId: {
|
handler(newValue, oldValue) {
|
this.queryReport.current = 1
|
this.$nextTick(() => {
|
if (this.currItem != null && this.currItem === 'feed') {
|
if (newValue) {
|
// 根据所需物料进行过滤
|
this.paramObject = { partId: newValue }
|
this.loadStockByWorkstation()
|
this.loadFeedByWorkstation(this.workstationId)
|
this.loadReserveByTask()
|
this.loadERPStore()
|
} else {
|
this.paramObject = null
|
this.loadStockByWorkstation()
|
this.loadFeedByWorkstation(this.workstationId)
|
this.loadReserveByTask()
|
this.loadERPStore()
|
}
|
}
|
})
|
},
|
immediate: true
|
}
|
}
|
}
|
</script>
|
<style lang="scss" scoped>
|
/deep/ .el-table__footer .el-table-column--selection .cell {
|
padding: 0;
|
text-align: center;
|
}
|
.need-feed-header {
|
margin-top: 20px;
|
margin-bottom: 14px;
|
display: flex;
|
justify-content: space-between;
|
align-items: center;
|
}
|
.pane-divider {
|
width: 4px;
|
background-color: #4283ee;
|
}
|
.need-feed-content {
|
}
|
.feed-table >>> .stripe-row {
|
background: #f6f9fe;
|
}
|
.feed-table >>> .el-table__header th {
|
padding-bottom: 0px;
|
}
|
.feed-table >>> th .cell div {
|
/*display: block;*/
|
}
|
.feed-table >>> th .cell {
|
height: 60px;
|
}
|
.feed-table >>> td {
|
padding: 3px 0px;
|
}
|
.feed-table .el-input {
|
padding: 0px 0px;
|
}
|
.feed-table >>> .feed-input-search {
|
background: url('/img/workbench/icon_search.png') center center no-repeat;
|
background-size: cover;
|
}
|
|
.feed-table >>> .feed-input-search:before {
|
content: '搜';
|
font-size: 14px;
|
visibility: hidden;
|
}
|
.line-side-warehouse-header {
|
margin-top: 10px;
|
margin-bottom: 14px;
|
display: flex;
|
justify-content: space-between;
|
align-items: center;
|
}
|
.line-side-warehouse-header >>> .feed-btn-feeding {
|
background: url('/img/workbench/icon_wl1.png') center center no-repeat;
|
background-size: cover;
|
}
|
|
.line-side-warehouse-header >>> .feed-btn-feeding:before {
|
content: '投';
|
font-size: 14px;
|
visibility: hidden;
|
}
|
.feeding-btn {
|
background-image: -webkit-linear-gradient(139deg, #5f6eef 0%, #2783ff 100%);
|
background-image: -moz-linear-gradient(139deg, #5f6eef 0%, #2783ff 100%);
|
background-image: linear-gradient(139deg, #5f6eef 0%, #2783ff 100%);
|
color: #fff;
|
border-color: #e8effb;
|
border-radius: 15px;
|
padding: 6px 15px;
|
}
|
.feeding-btn >>> span {
|
margin-left: 3px;
|
}
|
.line-side-warehouse-content >>> th .cell:first-child {
|
/*line-height: 55px;
|
text-align: center;*/
|
}
|
.workstation-house-header {
|
margin-top: 10px;
|
margin-bottom: 14px;
|
display: flex;
|
justify-content: space-between;
|
align-items: center;
|
}
|
.workstation-house-header >>> .feed-btn-return {
|
background: url('/img/workbench/icon_return1.png') center center no-repeat;
|
background-size: cover;
|
}
|
|
.workstation-house-header >>> .feed-btn-return:before {
|
content: '退';
|
font-size: 14px;
|
visibility: hidden;
|
}
|
.return-btn {
|
background-image: -webkit-linear-gradient(139deg, #ff3f20 0%, #f77339 100%);
|
background-image: -moz-linear-gradient(139deg, #ff3f20 0%, #f77339 100%);
|
background-image: linear-gradient(139deg, #ff3f20 0%, #f77339 100%);
|
color: #fff;
|
border-color: #fbecec;
|
border-radius: 15px;
|
padding: 6px 15px;
|
}
|
.return-btn >>> span {
|
margin-left: 3px;
|
}
|
.workstation-house-content >>> th .cell:first-child {
|
/*line-height: 55px;
|
text-align: center;*/
|
}
|
.task-reserve-warehouse-header {
|
margin-top: 10px;
|
margin-bottom: 14px;
|
display: flex;
|
justify-content: space-between;
|
align-items: center;
|
}
|
.task-reserve-warehouse-header >>> .feed-btn-feeding {
|
background: url('/img/workbench/icon_wl1.png') center center no-repeat;
|
background-size: cover;
|
}
|
|
.task-reserve-warehouse-header >>> .feed-btn-feeding:before {
|
content: '预';
|
font-size: 14px;
|
visibility: hidden;
|
}
|
.pagin-page {
|
display: flex;
|
justify-content: end;
|
align-items: center;
|
}
|
|
::v-deep .el-table__body tr.current-row > td {
|
color: #fff;
|
background: #409eff !important;
|
}
|
</style>
|