zss
2023-12-11 c880739ec4cd5ede33b31eb98ad5f7628ea288e5
src/views/product/workbench/feed-pane.vue
@@ -137,21 +137,21 @@
      </el-table-column>
    </el-table>
    <el-tabs v-model="activeName">
      <el-tab-pane name="first" label="线边仓合格物料">
      <!-- <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
            <!-- <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"
@@ -229,16 +229,16 @@
            </template>
          </el-table-column> -->
          <el-table-column
            label="零件描述"
            prop="partDescription"
            label="零件"
            prop="partName"
            align="center" show-overflow-tooltip
          >
            <template slot="header">
              <div style="line-height: 14px;">零件描述</div>
              <div style="line-height: 14px;">零件</div>
              <div class="th" @click.stop>
                <el-input
                  type="text"
                  v-model="queryParamTwo.partDescription"
                  v-model="queryParamTwo.partName"
                  @keyup.enter.native="handleStockList"
                  clearable
                  @clear="handleStockList"
@@ -247,12 +247,12 @@
              </div>
            </template>
            <template slot-scope="scope">
              <span>{{ scope.row.partDescription }}</span>
              <span>{{ scope.row.partName }}</span>
            </template>
          </el-table-column>
          <el-table-column label="IFS批次号" prop="ifsBatchNo" align="center">
          <el-table-column label="批次号" prop="ifsBatchNo" align="center">
            <template slot="header">
              <div style="line-height: 14px;">IFS批次号</div>
              <div style="line-height: 14px;">批次号</div>
              <div class="th" @click.stop>
                <el-input
                  type="text"
@@ -268,7 +268,7 @@
              <span>{{ scope.row.ifsBatchNo }}</span>
            </template>
          </el-table-column>
               <el-table-column label="WDR号" prop="ifsWdr" 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>
@@ -285,7 +285,7 @@
                 <template slot-scope="scope">
                   <span>{{ scope.row.ifsWdr }}</span>
                 </template>
               </el-table-column>
               </el-table-column> -->
          <!-- <el-table-column label="SN号" prop="partBatchNo" align="center">
            <template slot="header">
              <div style="line-height: 14px;">SN号</div>
@@ -375,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"
@@ -384,7 +384,7 @@
                  @clear="handleStockList"
                  size="mini"
                ></el-input>
              </div> -->
              </div>
            </template>
            <template slot-scope="scope">
              <span>{{ scope.row.availableStockQuantity }}</span>
@@ -393,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"
@@ -402,19 +402,19 @@
                  @clear="handleStockList"
                  size="mini"
                ></el-input>
              </div> -->
              </div>
            </template>
            <template slot-scope="scope">
              <span>{{ scope.row.stockQuantity }}</span>
            </template>
          </el-table-column>
          <el-table-column
          <!-- <el-table-column
            label="预留数量"
            prop="reserveQuantity"
            align="center"
          >
            <template slot="header">
              <div style="line-height: 14px;">预留数量</div>
              <div style="line-height: 14px;">预留数量</div> -->
              <!-- <div class="th" @click.stop>
                <el-input
                  type="text"
@@ -425,9 +425,33 @@
                  size="mini"
                ></el-input>
              </div> -->
            </template>
            <!-- </template>
            <template slot-scope="scope">
              <span>{{ scope.row.reserveQuantity }}</span>
            </template>
          </el-table-column> -->
          <el-table-column label="是否工序库存" prop="operationStockStatus" align="center">
            <template slot-scope="scope">
              <span v-if="scope.row.operationStockStatus">是</span>
              <span v-else>否</span>
            </template>
          </el-table-column>
          <el-table-column label="所属工序" prop="name" align="center">
            <template slot="header">
              <div style="line-height: 14px;">所属工序</div>
              <div class="th" @click.stop>
                <el-input
                  type="text"
                  v-model="queryParamTwo.name"
                  @keyup.enter.native="handleStockList"
                  clearable
                  @clear="handleStockList"
                  size="mini"
                ></el-input>
              </div>
            </template>
            <template slot-scope="scope">
              <span>{{ scope.row.name }}</span>
            </template>
          </el-table-column>
          <el-table-column label="库位号" prop="locationNo" align="center">
@@ -461,7 +485,7 @@
          >
          </el-pagination>
        </div> -->
      </el-tab-pane>
      <!-- </el-tab-pane> -->
      <!-- <el-tab-pane name="second" label="线边仓待处理物料">
        <div class="line-side-warehouse-header">
          <div>
@@ -480,7 +504,7 @@
              >扫码投料</el-button
            >
            <el-button
              class="feeding-btn"
              class="feeding-btn"locationNo
              type="primary"
              icon="feed-btn-feeding"
              @click="addFeed()"
@@ -1130,7 +1154,7 @@
        ><span style="font-size:14px;font-weight:bold">已投入未消耗物料</span>
      </div>
      <div>
            <el-button
            <!-- <el-button
              class="return-btn"
              type="primary"
              @click="submitIns()"
@@ -1141,7 +1165,7 @@
              type="primary"
              @click="inputHandle()"
              >尾料处理</el-button
            >
            > -->
        <el-button
          class="return-btn"
          type="primary"
@@ -1202,7 +1226,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"
@@ -1218,9 +1242,9 @@
          <span>{{ scope.row.partName }}</span>
        </template>
      </el-table-column>
      <el-table-column label="IFS批次号" prop="ifsBatchNo" align="center">
      <el-table-column label="批次号" prop="ifsBatchNo" align="center">
        <template slot="header" slot-scope="scope">
          <div style="line-height: 14px;">IFS批次号</div>
          <div style="line-height: 14px;">批次号</div>
          <div class="th" @click.stop>
            <el-input
              type="text"
@@ -1236,7 +1260,7 @@
          <span>{{ scope.row.ifsBatchNo }}</span>
        </template>
      </el-table-column>
         <el-table-column label="WDR号" prop="ifsWdr" 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>
@@ -1253,7 +1277,7 @@
           <template slot-scope="scope">
             <span>{{ scope.row.ifsWdr }}</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>
@@ -1358,6 +1382,30 @@
          <span>{{ scope.row.stockQuantity }}</span>
        </template>
      </el-table-column>
      <el-table-column label="是否工序库存" prop="operationStockStatus" align="center">
        <template slot-scope="scope">
          <span v-if="scope.row.operationStockStatus">是</span>
          <span v-else>否</span>
        </template>
      </el-table-column>
      <el-table-column label="所属工序" prop="name" align="center">
        <template slot="header">
          <div style="line-height: 14px;">所属工序</div>
          <div class="th" @click.stop>
            <el-input
                  type="text"
                  v-model="queryParamTwo.name"
                  @keyup.enter.native="handleStockList"
                  clearable
                  @clear="handleStockList"
                  size="mini"
            ></el-input>
          </div>
        </template>
        <template slot-scope="scope">
          <span>{{ scope.row.name }}</span>
        </template>
      </el-table-column>
      <el-table-column label="库位号" prop="ifsLocation" align="center">
        <template slot="header" slot-scope="scope">
          <div style="line-height: 14px;">库位号</div>
@@ -1373,7 +1421,7 @@
          </div>
        </template>
        <template slot-scope="scope">
          <span>{{ scope.row.ifsLocation }}</span>
          <span>{{ scope.row.locNo }}</span>
        </template>
      </el-table-column>
      <el-table-column label="单位" prop="unit" align="center">
@@ -1487,11 +1535,11 @@
</template>
<script>
import { getStock, getFeed, getTodoStock, submitInsPart, inputHandle } from '@/api/product/personboard'
import { getStock, getFeed,getFeed2, getTodoStock, submitInsPart, inputHandle } from '@/api/product/personboard'
import { getMaterial } from '@/api/plan/operationtask'
import {
  getERPStockListByPart,
  fetchList
  fetchList,
} from '@/api/warehouse/joinstockorder'
import feedFormDialog from './feed-form'
import returnMaterialFormDialog from './returnmaterial-form'
@@ -1814,7 +1862,7 @@
          this.paramObject,
          this.queryParamThree
        )
        getFeed(query, stationId)
        getFeed2(query, stationId)
          .then((response) => {
            var data = response.data
            if (data.code === 0) {
@@ -1929,7 +1977,6 @@
         }
      },
      inputHandle(){
         console.log(this.currOperateTask);
         if (this.selectFeeds.length > 0) {
            var list = []
            this.selectFeeds.forEach(a=>{
@@ -2035,8 +2082,7 @@
      getERPStockListByPart({
        partNo: part.partNo,
        partBatchNo: part.partBatchNo
      })
        .then((resp) => {
      }).then((resp) => {
          const respCode = resp.data.code
          const respData = resp.data.data
          if (respCode === 0) {
@@ -2045,8 +2091,7 @@
            this.isSubmit = false
            this.$message.error('库存列表查询失败')
          }
        })
        .catch(() => {
        }).catch(() => {
          this.isSubmit = false
          console.log('查询零件对应的库存列表时,发生错误')
        })
@@ -2178,6 +2223,14 @@
    }
  },
  watch: {
    showFeedForm:{
      handler(newVal,oldVal){
        if(!newVal){
          this.$refs.stockTable.toggleAllSelection(false)
        }
      },
      deep: true
    },
    workstationId() {
      this.$nextTick(() => {
        if (this.currItem != null && this.currItem === 'feed') {