86134
2023-11-11 4652431ce329b4dec6c4dcc0758d5c4ff97e0666
src/views/product/workbench/feed-pane.vue
@@ -1,7 +1,7 @@
<template>
  <div style="padding:0px 14px;height: 100%;overflow: auto;">
    <div class="need-feed-header">
      <div style="height:28px;line-height:28px;">
      <div>
        <el-divider class="pane-divider" direction="vertical"></el-divider
        ><span style="font-size:14px;font-weight:bold">工单所需物料</span>
      </div>
@@ -205,7 +205,7 @@
              <span>{{ scope.row.partNo }}</span>
            </template>
          </el-table-column>
          <el-table-column
          <!-- <el-table-column
            label="零件"
            prop="partName"
            align="center"
@@ -227,11 +227,11 @@
            <template slot-scope="scope">
              <span>{{ scope.row.partName }}</span>
            </template>
          </el-table-column>
          </el-table-column> -->
          <el-table-column
            label="零件描述"
            prop="partDescription"
            align="center"
            align="center" show-overflow-tooltip
          >
            <template slot="header">
              <div style="line-height: 14px;">零件描述</div>
@@ -268,7 +268,25 @@
              <span>{{ scope.row.ifsBatchNo }}</span>
            </template>
          </el-table-column>
          <el-table-column label="SN号" prop="partBatchNo" align="center">
               <el-table-column label="WDR号" prop="ifsWdr" align="center">
                 <template slot="header">
                   <div style="line-height: 14px;">WDR号</div>
                   <div class="th" @click.stop>
                     <el-input
                       type="text"
                       v-model="queryParamTwo.ifsWdr"
                       @keyup.enter.native="handleStockList"
                       clearable
                       @clear="handleStockList"
                       size="mini"
                     ></el-input>
                   </div>
                 </template>
                 <template slot-scope="scope">
                   <span>{{ scope.row.ifsWdr }}</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>
@@ -308,8 +326,8 @@
            <template slot-scope="scope">
              <span>{{ scope.row.reelNumber }}</span>
            </template>
          </el-table-column>
          <el-table-column
          </el-table-column> -->
          <!-- <el-table-column
            label="规格型号"
            prop="specs"
            align="center"
@@ -331,7 +349,7 @@
            <template slot-scope="scope">
              <span>{{ scope.row.specs }}</span>
            </template>
          </el-table-column>
          </el-table-column> -->
          <el-table-column label="单位" prop="unit" align="center">
            <template slot="header">
              <div style="line-height: 14px;">单位</div>
@@ -357,7 +375,7 @@
          >
            <template slot="header">
              <div style="line-height: 14px;">可用数量</div>
              <div class="th" @click.stop>
              <!-- <div class="th" @click.stop>
                <el-input
                  type="text"
                  v-model="queryParamTwo.availableStockQuantity"
@@ -366,7 +384,7 @@
                  @clear="handleStockList"
                  size="mini"
                ></el-input>
              </div>
              </div> -->
            </template>
            <template slot-scope="scope">
              <span>{{ scope.row.availableStockQuantity }}</span>
@@ -375,7 +393,7 @@
          <el-table-column label="库存数量" prop="stockQuantity" align="center">
            <template slot="header">
              <div style="line-height: 14px;">库存数量</div>
              <div class="th" @click.stop>
              <!-- <div class="th" @click.stop>
                <el-input
                  type="text"
                  v-model="queryParamTwo.stockQuantity"
@@ -384,7 +402,7 @@
                  @clear="handleStockList"
                  size="mini"
                ></el-input>
              </div>
              </div> -->
            </template>
            <template slot-scope="scope">
              <span>{{ scope.row.stockQuantity }}</span>
@@ -397,7 +415,7 @@
          >
            <template slot="header">
              <div style="line-height: 14px;">预留数量</div>
              <div class="th" @click.stop>
              <!-- <div class="th" @click.stop>
                <el-input
                  type="text"
                  v-model="queryParamTwo.reserveQuantity"
@@ -406,7 +424,7 @@
                  @clear="handleStockList"
                  size="mini"
                ></el-input>
              </div>
              </div> -->
            </template>
            <template slot-scope="scope">
              <span>{{ scope.row.reserveQuantity }}</span>
@@ -431,7 +449,7 @@
            </template>
          </el-table-column>
        </el-table>
        <div class="pagin-page" style="margin-top: 0;margin-bottom: 0;">
        <!-- <div class="pagin-page" style="margin-top: 0;margin-bottom: 0;">
          <el-pagination
            :current-page="queryReport.current"
            :page-sizes="[10, 15, 20, 50, 100]"
@@ -442,11 +460,9 @@
            :total="queryReport.total"
          >
          </el-pagination>
        </div>
        </div> -->
      </el-tab-pane>
      <!--        -->
      <el-tab-pane name="second" label="线边仓待处理物料">
      <!-- <el-tab-pane name="second" label="线边仓待处理物料">
        <div class="line-side-warehouse-header">
          <div>
            <el-divider class="pane-divider" direction="vertical"></el-divider
@@ -568,9 +584,9 @@
            align="center"
            show-overflow-tooltip
          >
            <template slot="header">
            <template slot="header"> -->
              <!-- <div style="line-height: 14px;">IFS批次号</div> -->
              <div class="th" @click.stop>
              <!-- <div class="th" @click.stop>
                <el-input
                  type="text"
                  v-model="queryTodoParam.ifsBatchNo"
@@ -765,10 +781,10 @@
          >
          </el-pagination>
        </div>
      </el-tab-pane>
      </el-tab-pane> -->
      <!--        -->
      <el-tab-pane name="third" label="配盘物料">
      <!-- <el-tab-pane name="third" label="配盘物料">
        <div class="task-reserve-warehouse-header">
          <div>
            <el-divider class="pane-divider" direction="vertical"></el-divider
@@ -859,7 +875,7 @@
              <span>{{ scope.row.partName }}</span>
            </template>
          </el-table-column>
          <!--          <el-table-column label="IFS批次号" prop="ifsBatchNo" align="center">-->
                   <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>-->
@@ -876,7 +892,7 @@
          <!--            <template slot-scope="scope">-->
          <!--              <span>{{ scope.row.ifsBatchNo }}</span>-->
          <!--            </template>-->
          <!--          </el-table-column>-->
          <!--          </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>
@@ -1000,9 +1016,9 @@
            </template>
          </el-table-column>
        </el-table>
      </el-tab-pane>
      </el-tab-pane> -->
      <el-tab-pane name="four" label="ERP物料">
      <!-- <el-tab-pane name="four" label="ERP物料">
        <div class="task-reserve-warehouse-header">
          <div>
            <el-divider class="pane-divider" direction="vertical"></el-divider
@@ -1106,7 +1122,7 @@
            </template>
          </el-table-column>
        </el-table>
      </el-tab-pane>
      </el-tab-pane> -->
    </el-tabs>
    <div class="workstation-house-header">
      <div>
@@ -1114,6 +1130,18 @@
        ><span style="font-size:14px;font-weight:bold">已投入未消耗物料</span>
      </div>
      <div>
            <el-button
              class="return-btn"
              type="primary"
              @click="submitIns()"
              >报检</el-button
            >
            <el-button
              class="return-btn"
              type="primary"
              @click="inputHandle()"
              >尾料处理</el-button
            >
        <el-button
          class="return-btn"
          type="primary"
@@ -1174,7 +1202,7 @@
        :show-overflow-tooltip="true"
      >
        <template slot="header" slot-scope="scope">
          <div style="line-height: 14px;">零件</div>
          <div style="line-height: 14px;">零件描述</div>
          <div class="th" @click.stop>
            <el-input
              type="text"
@@ -1208,7 +1236,25 @@
          <span>{{ scope.row.ifsBatchNo }}</span>
        </template>
      </el-table-column>
      <el-table-column label="SN号" prop="partBatchNo" align="center">
         <el-table-column label="WDR号" prop="ifsWdr" align="center">
           <template slot="header" slot-scope="scope">
             <div style="line-height: 14px;">WDR号</div>
             <div class="th" @click.stop>
               <el-input
                 type="text"
                 v-model="queryParamThree.ifsWdr"
                 @keyup.enter.native="handleFeedList"
                 clearable
                 @clear="handleFeedList"
                 size="mini"
               ></el-input>
             </div>
           </template>
           <template slot-scope="scope">
             <span>{{ scope.row.ifsWdr }}</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>
@@ -1271,7 +1317,7 @@
        <template slot-scope="scope">
          <span>{{ scope.row.specs }}</span>
        </template>
      </el-table-column>
      </el-table-column> -->
      <el-table-column
        label="可用数量"
        prop="availableStockQuantity"
@@ -1312,13 +1358,13 @@
          <span>{{ scope.row.stockQuantity }}</span>
        </template>
      </el-table-column>
      <el-table-column label="库位号" prop="locNo" align="center">
      <el-table-column label="库位号" prop="ifsLocation" 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"
              v-model="queryParamThree.ifsLocation"
              @keyup.enter.native="handleFeedList"
              clearable
              @clear="handleFeedList"
@@ -1327,7 +1373,7 @@
          </div>
        </template>
        <template slot-scope="scope">
          <span>{{ scope.row.locNo }}</span>
          <span>{{ scope.row.ifsLocation }}</span>
        </template>
      </el-table-column>
      <el-table-column label="单位" prop="unit" align="center">
@@ -1348,7 +1394,7 @@
          <span>{{ scope.row.unit }}</span>
        </template>
      </el-table-column>
      <el-table-column label="投料人" prop="createUser" align="center">
     <!-- <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>
@@ -1365,8 +1411,8 @@
        <template slot-scope="scope">
          <span>{{ scope.row.createUser }}</span>
        </template>
      </el-table-column>
      <el-table-column
      </el-table-column> -->
      <!-- <el-table-column
        label="投料时间"
        prop="createTime"
        align="center"
@@ -1394,7 +1440,7 @@
        <template slot-scope="scope">
          <span>{{ scope.row.createTime }}</span>
        </template>
      </el-table-column>
      </el-table-column> -->
    </el-table>
    <feedFormDialog
      :currshowlist.sync="showFeedForm"
@@ -1441,7 +1487,7 @@
</template>
<script>
import { getStock, getFeed, getTodoStock } from '@/api/product/personboard'
import { getStock, getFeed, getTodoStock, submitInsPart, inputHandle } from '@/api/product/personboard'
import { getMaterial } from '@/api/plan/operationtask'
import {
  getERPStockListByPart,
@@ -1556,9 +1602,9 @@
          .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.stockList = data.data.records
              this.queryReport.total = data.data.total */
                     this.stockList = data.data
              // this.getReportData()
            } else {
              this.$message.error('获取线边仓信息失败')
@@ -1850,6 +1896,57 @@
        this.$message.warning('请选择投料零件')
      }
    },
      // 报检
      submitIns(){
         if (this.selectFeeds.length > 0) {
            var list = []
            this.selectFeeds.forEach(a=>{
               list.push({
                  partNo: a.partNo,
                  partDesc: a.partName,
                  qtyToInspect: a.availableStockQuantity,
                  partId: a.partId,
                  waivDevRejNo: a.ifsWdr,
                  targetQualifiedLocationId: a.locationId,
                  workstationId: a.workstationId,
                  taskId: this.currOperateTask.id,
                  locationNo: a.ifsLocation,
                  lotBatchNo: a.ifsBatchNo,
                  qtyArrived: a.stockQuantity,
                  waivDevRejNo: a.ifsWdr,
                  serialNo: a.serialNo,
                  operationId: this.currOperateTask.operationId,
                  stockId: a.id,
                  engChgLevel: a.engChgLevel,
                  activitySeq: a.activitySeq
               })
            })
            submitInsPart(list).then(res=>{
               this.$message.success('报检完成')
            })
         }else{
            this.$message.warning('请选择报检零件')
         }
      },
      inputHandle(){
         console.log(this.currOperateTask);
         if (this.selectFeeds.length > 0) {
            var list = []
            this.selectFeeds.forEach(a=>{
               list.push({
                  taskId: this.currOperateTask.id,
                  stockId: a.id,
               })
            })
            this.$confirm("此操作将会把所选物料平均计算到所有报工单的投入里").then(()=>{
               inputHandle(list).then(res=>{
                  this.$message.success('处理完成')
               })
            }).catch(e=>{})
         } else {
           this.$message.warning('请选择尾料处理的物料')
         }
      },
    // 初始化页面变量
    initFeed() {
      this.selectStocks = []